package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:24:42 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductFeatureCheckListBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductFeatureCheckList productFeatureCheckList;

  protected BeanMap getBeanMap() {

    return new BeanMap(productFeatureCheckList);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductFeatureCheckListDAO.Id);

    mappedDaoFields.put(
        "productFeatureId",
        com.ourteam.product.requirement.dao.IProductFeatureCheckListDAO.ProductFeatureId);

    mappedDaoFields.put(
        "checkContent",
        com.ourteam.product.requirement.dao.IProductFeatureCheckListDAO.CheckContent);

    mappedDaoFields.put(
        "sortIndex", com.ourteam.product.requirement.dao.IProductFeatureCheckListDAO.SortIndex);

    mappedDaoFields.put(
        "status", com.ourteam.product.requirement.dao.IProductFeatureCheckListDAO.Status);

    mappedDaoFields.put(
        "remarks", com.ourteam.product.requirement.dao.IProductFeatureCheckListDAO.Remarks);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductFeatureCheckListBean() {
    super();

    this.productFeatureCheckList =
        new com.ourteam.product.requirement.dao.ProductFeatureCheckList();
  }

  public ProductFeatureCheckListBean(
      com.ourteam.product.requirement.dao.ProductFeatureCheckList productFeatureCheckList) {
    super();

    this.productFeatureCheckList = productFeatureCheckList;
  }

  public com.ourteam.product.requirement.dao.ProductFeatureCheckList
      convertToProductFeatureCheckList() {
    return this.productFeatureCheckList;
  }

  public com.ourteam.product.requirement.dao.ProductFeatureCheckList convertTo() {
    return this.productFeatureCheckList;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productFeatureCheckList.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productFeatureCheckList.setId(id);
  }

  /**
   * Get productFeatureId
   *
   * @return long
   */
  public long getProductFeatureId() {
    return (long) this.productFeatureCheckList.getProductFeatureId();
  }

  /**
   * Set productFeatureId
   *
   * @parameter long
   */
  public void setProductFeatureId(long productFeatureId) {

    this.productFeatureCheckList.setProductFeatureId(productFeatureId);
  }

  /**
   * Get checkContent
   *
   * @return String
   */
  public String getCheckContent() {
    return (String) this.productFeatureCheckList.getCheckContent();
  }

  /**
   * Set checkContent
   *
   * @parameter String
   */
  public void setCheckContent(String checkContent) {

    this.productFeatureCheckList.setCheckContent(checkContent);
  }

  /**
   * Get sortIndex
   *
   * @return int
   */
  public int getSortIndex() {
    return (int) this.productFeatureCheckList.getSortIndex();
  }

  /**
   * Set sortIndex
   *
   * @parameter int
   */
  public void setSortIndex(int sortIndex) {

    this.productFeatureCheckList.setSortIndex(sortIndex);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productFeatureCheckList.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productFeatureCheckList.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productFeatureCheckList.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productFeatureCheckList.setRemarks(remarks);
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductFeatureCheckListBean) == false) {
      return false;
    } // end if

    ProductFeatureCheckListBean other = (ProductFeatureCheckListBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductFeatureCheckList tempProductFeatureCheckList =
        other.convertToProductFeatureCheckList();

    if (tempProductFeatureCheckList == null || this.productFeatureCheckList == null) {
      isEqual = false;
    } else if (tempProductFeatureCheckList == this.productFeatureCheckList
        || tempProductFeatureCheckList.equals(this.productFeatureCheckList)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductFeatureCheckListBean[] toArray(
      com.ourteam.product.requirement.dao.ProductFeatureCheckList[] aProductFeatureCheckLists) {

    return toArray(aProductFeatureCheckLists, null);
  }

  public static ProductFeatureCheckListBean[] toArray(
      com.ourteam.product.requirement.dao.ProductFeatureCheckList[] aProductFeatureCheckLists,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductFeatureCheckLists)) {
      return new ProductFeatureCheckListBean[0];
    }

    int length = aProductFeatureCheckLists.length;

    ProductFeatureCheckListBean[] beans = new ProductFeatureCheckListBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductFeatureCheckListBean(aProductFeatureCheckLists[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductFeatureCheckLists[i]});
      }
    }

    return beans;
  }
}
